#ifndef PAGEVOLT2AMPERE_H
#define PAGEVOLT2AMPERE_H

#include <QWidget>
#include <QLabel>
#include <QRadioButton>
#include <QVector>
#include <QtGui>
//#include <sys/ioctl.h>
#include <sys/stat.h>

class widgetHarmonic : public QWidget
{
    Q_OBJECT
public:
    explicit widgetHarmonic(QWidget *parent = 0);
    QTableView *tableView;

public:
    QByteArray sendBuf;
    QString sendTcpBuf;

    void DataInit();

private:
    typedef QPushButton myButton;
    bool isInTesting;
    bool waveView;

    QLabel* labInfo;

    QWidget* widgetInfo;

    QByteArray getdata;

//    QCPDataMap *dataGraph1;
//    QCPDataMap *dataGraph0;

    QString send_tmp;

//pagedown_right
    QLineEdit *Frequency;
    QComboBox *Passageway;
    myButton *WaveScan;
    myButton *DataClear;
    myButton *Save_setting;
    myButton *btnStart;


    void setDataStyle(QLineEdit *lab);
    QString findFloatStr(QByteArray str);

    QWidget *paintArea;
//    QCustomPlot *myPlot;
    QTimer *plotTimer;

signals:
    void cmdSend();
    void TcpSend();

public slots:
    void recvResult(QByteArray rcvdByte);
//    void startTest();
    void widgetInfoHide(){widgetInfo->hide();}
    void init();
    void set_saved();
    QString change_data(int,QString);
    void save_data(QString,int);
    void tableViewItem_change(QModelIndex,QModelIndex);
    void waveClear();
    void makewave();
    void showTcpData(QString,QString);
    void resolveTCPData(QString);
};

#endif // PAGEVOLT2AMPERE_H
